import pika

def new_task(msg):
    connection = pika.BlockingConnection(
        pika.ConnectionParameters('rmq'))
    channel = connection.channel()

    message = msg
    channel.basic_publish(exchange='',
                        routing_key='hello',
                        body=message)
    print(f" [x] Sent {message}")

    connection.close()
